{include file='public/meta' }
	<title>第三方登录配置 - 木鱼内容管理系统</title>
</head>
<body>
    
    <div class="layui-fluid">
        
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                  <div class="layui-card-header">QQ登录配置&nbsp;&nbsp;&nbsp;<span style="color:red;">[tips:回调地址不可更改]</span></div>
                  <div class="layui-card-body">
                    <form class="form form-horizontal" id="qq">
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App ID:</label>
                        <div class="layui-input-block">
                          <input type="text" name="qq_app_key" value="{$oauth.qq.app_key}" class="layui-input" placeholder="请输入App ID">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App secret:</label>
                        <div class="layui-input-block">
                          <input type="text" name="qq_app_secret" value="{$oauth.qq.app_secret}" class="layui-input" placeholder="请输入App secret">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">回调地址:</label>
                        <div class="layui-input-block">
                          <input type="text" name="qq_callback" value="{$Request.domain}/oauth/callback/type/qq" class="layui-input" placeholder="请输入回调地址" readonly="readonly">
                        </div>
                    </div>
                    </form> 
                  </div>
                </div>
            </div>
        </div>
        
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                  <div class="layui-card-header">微信登录配置&nbsp;&nbsp;&nbsp;<span style="color:red;">[tips:回调地址不可更改]</span></div>
                  <div class="layui-card-body">
                    <form class="form form-horizontal" id="wx">
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App ID:</label>
                        <div class="layui-input-block">
                          <input type="text" name="weixin_app_key" value="{$oauth.weixin.app_key}" class="layui-input" placeholder="请输入App ID">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App secret:</label>
                        <div class="layui-input-block">
                          <input type="text" name="weixin_app_secret" value="{$oauth.weixin.app_secret}" class="layui-input" placeholder="请输入App secret">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">回调地址:</label>
                        <div class="layui-input-block">
                          <input type="text" name="weixin_callback" value="{$Request.domain}/oauth/callback/type/weixin" class="layui-input" placeholder="请输入回调地址" readonly="readonly">
                        </div>
                    </div>
                    </form> 
                  </div>
                </div>
            </div>
        </div>
        
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                  <div class="layui-card-header">新浪微博登录配置&nbsp;&nbsp;&nbsp;<span style="color:red;">[tips:回调地址不可更改]</span></div>
                  <div class="layui-card-body">
                    <form class="form form-horizontal" id="sina">
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App ID:</label>
                        <div class="layui-input-block">
                          <input type="text" name="sina_app_key" value="{$oauth.sina.app_key}" class="layui-input" placeholder="请输入App ID">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App secret:</label>
                        <div class="layui-input-block">
                          <input type="text" name="sina_app_secret" value="{$oauth.sina.app_secret}" class="layui-input" placeholder="请输入App secret">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">回调地址:</label>
                        <div class="layui-input-block">
                          <input type="text" name="sina_callback" value="{$Request.domain}/oauth/callback/type/sina" class="layui-input" placeholder="请输入回调地址" readonly="readonly">
                        </div>
                    </div>
                    </form> 
                  </div>
                </div>
            </div>
        </div>
        
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                  <div class="layui-card-header">百度登录配置&nbsp;&nbsp;&nbsp;<span style="color:red;">[tips:回调地址不可更改]</span></div>
                  <div class="layui-card-body">
                    <form class="form form-horizontal" id="baidu">
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App ID:</label>
                        <div class="layui-input-block">
                          <input type="text" name="baidu_app_key" value="{$oauth.baidu.app_key}" class="layui-input" placeholder="请输入App ID">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App secret:</label>
                        <div class="layui-input-block">
                          <input type="text" name="baidu_app_secret" value="{$oauth.baidu.app_secret}" class="layui-input" placeholder="请输入App secret">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">回调地址:</label>
                        <div class="layui-input-block">
                          <input type="text" name="baidu_callback" value="{$Request.domain}/oauth/callback/type/baidu" class="layui-input" placeholder="请输入回调地址" readonly="readonly">
                        </div>
                    </div>
                    </form> 
                  </div>
                </div>
            </div>
        </div>
        
        
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                  <div class="layui-card-header">Gitee登录配置&nbsp;&nbsp;&nbsp;<span style="color:red;">[tips:回调地址不可更改]</span></div>
                  <div class="layui-card-body">
                    <form class="form form-horizontal" id="gitee">
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App ID:</label>
                        <div class="layui-input-block">
                          <input type="text" name="gitee_app_key" value="{$oauth.gitee.app_key}" class="layui-input" placeholder="请输入App ID">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App secret:</label>
                        <div class="layui-input-block">
                          <input type="text" name="gitee_app_secret" value="{$oauth.gitee.app_secret}" class="layui-input" placeholder="请输入App secret">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">回调地址:</label>
                        <div class="layui-input-block">
                          <input type="text" name="gitee_callback" value="{$Request.domain}/oauth/callback/type/gitee" class="layui-input" placeholder="请输入回调地址" readonly="readonly">
                        </div>
                    </div>
                    </form> 
                  </div>
                </div>
            </div>
        </div>
        
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                  <div class="layui-card-header">Github登录配置&nbsp;&nbsp;&nbsp;<span style="color:red;">[tips:回调地址不可更改]</span></div>
                  <div class="layui-card-body">
                    <form class="form form-horizontal" id="github">
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App ID:</label>
                        <div class="layui-input-block">
                          <input type="text" name="github_app_key" value="{$oauth.github.app_key}" class="layui-input" placeholder="请输入App ID">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App secret:</label>
                        <div class="layui-input-block">
                          <input type="text" name="github_app_secret" value="{$oauth.github.app_secret}" class="layui-input" placeholder="请输入App secret">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">回调地址:</label>
                        <div class="layui-input-block">
                          <input type="text" name="github_callback" value="{$Request.domain}/oauth/callback/type/github" class="layui-input" placeholder="请输入回调地址" readonly="readonly">
                        </div>
                    </div>
                    </form> 
                  </div>
                </div>
            </div>
        </div>
        
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                  <div class="layui-card-header">抖音登录配置&nbsp;&nbsp;&nbsp;<span style="color:red;">[tips:回调地址不可更改]</span></div>
                  <div class="layui-card-body">
                    <form class="form form-horizontal" id="douyin">
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App ID:</label>
                        <div class="layui-input-block">
                          <input type="text" name="douyin_app_key" value="{$oauth.douyin.app_key}" class="layui-input" placeholder="请输入App ID">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App secret:</label>
                        <div class="layui-input-block">
                          <input type="text" name="douyin_app_secret" value="{$oauth.douyin.app_secret}" class="layui-input" placeholder="请输入App secret">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">回调地址:</label>
                        <div class="layui-input-block">
                          <input type="text" name="douyin_callback" value="{$Request.domain}/oauth/callback/type/douyin" class="layui-input" placeholder="请输入回调地址" readonly="readonly">
                        </div>
                    </div>
                    </form> 
                  </div>
                </div>
            </div>
        </div>
        
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                  <div class="layui-card-header">钉钉登录配置&nbsp;&nbsp;&nbsp;<span style="color:red;">[tips:回调地址不可更改]</span></div>
                  <div class="layui-card-body">
                    <form class="form form-horizontal" id="dingtalk">
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App ID:</label>
                        <div class="layui-input-block">
                          <input type="text" name="dingtalk_app_key" value="{$oauth.dingtalk.app_key}" class="layui-input" placeholder="请输入App ID">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">App secret:</label>
                        <div class="layui-input-block">
                          <input type="text" name="dingtalk_app_secret" value="{$oauth.dingtalk.app_secret}" class="layui-input" placeholder="请输入App secret">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">回调地址:</label>
                        <div class="layui-input-block">
                          <input type="text" name="dingtalk_callback" value="{$Request.domain}/oauth/callback/type/dingtalk" class="layui-input" placeholder="请输入回调地址" readonly="readonly">
                        </div>
                    </div>
                    </form> 
                  </div>
                </div>
            </div>
        </div>
                      <div class="layui-form-item">
                        <div class="layui-input-block">
                          <button class="layui-btn" type="button" id="btn">确认保存</button>
                        </div>
                      </div>
    </div>

	
	<!--_footer 作为公共模版分离出去-->
{include file='public/footer' }
	<!--/_footer /作为公共模版分离出去-->

<script type="text/javascript">
  layui.config({
    base: '__ADMINST__layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['form','element'],function(){
      var $ = layui.$
    ,element = layui.element//Tab的切换功能，切换事件监听等，需要依赖element模块
    ,form = layui.form ;
    
    //状态监听

  });
  
	/* 表单验证，提交 */
	$("#btn").on("click",function(){
		var qq = $("#qq").serializeArray();
        var wx = $("#wx").serializeArray();
        var sina = $("#sina").serializeArray();
        var baidu = $("#baidu").serializeArray();
        var gitee = $("#gitee").serializeArray();
        var github = $("#github").serializeArray();
        var douyin = $("#douyin").serializeArray();
        var dingtalk = $("#dingtalk").serializeArray();
        //表单合并
        Data = qq.concat(wx).concat(sina).concat(baidu).concat(gitee).concat(github).concat(douyin).concat(dingtalk);
		$.post("{:url('Oauth/indexEdit')}",Data,function(data){
		layer.msg(data.msg,{time:2000},function(){
			if(data.url) location.href = data.url;
		});
		});
	});
</script>
</body>
</html>
